package com.datang.springcode.incidentMonitor;

import org.springframework.context.event.EventListener;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
public class BlackListNotifier2 {

    //使用注解也可以监听事件
    @EventListener(value = {BlackListEvent.class})
    @Order(2)
    public void t(BlackListEvent event) {
        System.out.println("我是订阅者2，我啥都不干，就是随便监听");
    }
}
